package com.company.project.sys.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * 部门
  * @author ZYF
 * @date 2021/5/18 11:03
 */
@Data
@ApiModel(value = "部门")
public class SysDept implements Serializable {
    @TableId
    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "部门编号")
    private String deptNo;

    @NotBlank(message = "机构名称不能为空")
    @ApiModelProperty(value = "机构名称")
    private String name;

    @NotBlank(message = "父级不能为空")
    @ApiModelProperty(value = "父级id")
    private String pid;

    @TableField(exist = false)
    @ApiModelProperty(value = "父级名称")
    private String pidName;

    @ApiModelProperty(value = "状态(1:正常；0:弃用)")
    private Integer status;

    @ApiModelProperty(value = "为了维护更深层级关系")
    private String relationCode;

    @ApiModelProperty(value = "部门经理user_id")
    private String deptManagerId;

    @ApiModelProperty(value = "部门经理名称")
    private String managerName;

    @ApiModelProperty(value = "部门经理联系电话")
    private String phone;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新时间")
    private Date updateTime;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("是否删除(1未删除；0已删除)")
    private Integer deleted;

}